package org.x.note.init;

public class Super {
	// 类变量 所有实例共享
	private static String w = ("v1.0");
	// 实例变量 每个对象独有
	private String name = "a";

	// 静态初始化块
	static {
		w = "v3.0";
		System.out.println("父类的静态初始化块");
	}
	// 普通初始化块
	{
		name = "b";
		System.out.println("父类的普通初始化块");
	}

	public Super(String name) {
		this.name = name;
	}

	public static String getW() {
		return w;
	}

	public static void setW(String w) {
		Super.w = w;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
